
package cesdentalrecord.dao.view;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import cesdentalrecord.dao.controller.AddStudentController;

public class AddStudentView {
	
	AddStudentController adder = new AddStudentController();
	
	public void displayAcknowledgement(){
		System.out.println("Student has been successfully added.");
	}
	
	private String setSurname(String s){
		 return s;
	}

	public void sendAddStudentRequest(String lastname,String firstname,String mi,String gender,String grade,String section,String month,String day,String year,
			String bplace,String address,String parent,String occupation,String medhist,int age) throws IOException{
		

	BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
	    
	AddStudentView asv = new AddStudentView();
/*
    String firstname;
    String mi;
    String lastname;
    String grade;
    String section;
    String year;
    String day;
    String month;
    String bplace;
    String address;
    String parent;
    String occupation;
    String medhist;
	String gender;	
	
		System.out.println("Add Student inputs:");
		
		//name
		System.out.println("input Surname: ");
		lastname=input.readLine();
		
		System.out.println("input Firstname: ");
		firstname=input.readLine();
		
		System.out.println("input Middle Initial: ");
		mi=input.readLine();
		
		//gender
		System.out.println("input gender");
		gender=input.readLine();
		
		//grade and section
		System.out.println("input grade");
		grade=input.readLine();
		
		System.out.println("input section");
		section=input.readLine();
		
		//birthday
		System.out.println("input month of birth:");
		month=input.readLine();
		
		System.out.println("input day of birth:");
		day=input.readLine();
		
		System.out.println("input year of birth:");
		year=input.readLine();
		
		System.out.println("input place of birth:");
		bplace=input.readLine();
		
		System.out.println("input address:");
		address=input.readLine();
		
		System.out.println("input parent/guardian's name:");
		parent=input.readLine();
		
		System.out.println("input occupation:");
		occupation=input.readLine();
		
		System.out.println("input Medical History:");
		medhist=input.readLine();
		
	*/	
		boolean result = adder.validateEntries(lastname,firstname,mi,gender,grade,section,month,day,year,
				bplace,address,parent,occupation,medhist,age);
		
		if(result){
			asv.displayAcknowledgement();
		}else System.out.println("Error in adding student.");
	 
	}

}
